use reqwest::{Error, blocking::{ClientBuilder, Client}};

pub fn get(url: &str) -> Result<String, Error> {
    let client: Client = ClientBuilder::new()
        .user_agent("my_crawler/1.0")
        .build()?;
    let response = client.get(url).send()?;
    // println!("{:#?}", response);
    let text = response.text()?;
    Ok(text)
}
